﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IoTEdge.Grpc.Server.ABBLibs.config
{
    public class ABBDevice
    {
        public static string GetUI()
        {
            //return "{\"device\":[{\"name\":\"IP\",\"label\":\"IP\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"IP\"],\"edit_params\":[\"device\",\"IP\"],\"show_hide_params\":[\"device\",\"IP\"],\"data_type\":\"string\"},{\"name\":\"Port\",\"label\":\"Port\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"Port\"],\"edit_params\":[\"device\",\"Port\"],\"show_hide_params\":[\"device\",\"Port\"],\"data_type\":\"string\"},{\"name\":\"User\",\"label\":\"User\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"User\"],\"edit_params\":[\"device\",\"User\"],\"show_hide_params\":[\"device\",\"User\"],\"default_value\":\"Default User\",\"data_type\":\"string\"},{\"name\":\"Password\",\"label\":\"Password\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"Password\"],\"edit_params\":[\"device\",\"Password\"],\"show_hide_params\":[\"device\",\"Password\"],\"default_value\":\"robotics\",\"data_type\":\"string\"}],\"property\":[{\"name\":\"Address\",\"label\":\"Address\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"select\",\"is_required\":true,\"col\":24,\"no_format\":1,\"select_options\":[{\"id\":\"1\",\"name\":\"ABB_ID\"},{\"id\":\"2\",\"name\":\"ABB_ErrStatus\"},{\"id\":\"3\",\"name\":\"ABB_Speedratio\"},{\"id\":\"4\",\"name\":\"ABB_OperationMode\"},{\"id\":\"5\",\"name\":\"ABB_CtrlState\"},{\"id\":\"6\",\"name\":\"ABB_RT_X\"},{\"id\":\"7\",\"name\":\"ABB_Joint_1\"},{\"id\":\"8\",\"name\":\"ABB_Joint_2\"},{\"id\":\"9\",\"name\":\"ABB_Joint_3\"},{\"id\":\"10\",\"name\":\"ABB_Joint_4\"},{\"id\":\"11\",\"name\":\"ABB_Joint_5\"},{\"id\":\"12\",\"name\":\"ABB_Joint_6\"},{\"id\":\"13\",\"name\":\"ABB_RapidExecution\"},{\"id\":\"14\",\"name\":\"ABB_RapidExecutionCycler\"},{\"id\":\"15\",\"name\":\"ABB_RT_X\"},{\"id\":\"16\",\"name\":\"ABB_RT_Y\"},{\"id\":\"17\",\"name\":\"ABB_RT_Z\"},{\"id\":\"18\",\"name\":\"ABB_RT_Q1\"},{\"id\":\"19\",\"name\":\"ABB_RT_Q2\"},{\"id\":\"20\",\"name\":\"ABB_RT_Q3\"},{\"name\":\"ABB_RT_Q4\",\"id\":\"21\"}],\"select_options_ori\":[{\"id\":\"1\",\"name\":\"ABB_ID\"},{\"id\":\"2\",\"name\":\"ABB_ErrStatus\"},{\"id\":\"3\",\"name\":\"ABB_Speedratio\"},{\"id\":\"4\",\"name\":\"ABB_OperationMode\"},{\"id\":\"5\",\"name\":\"ABB_CtrlState\"},{\"id\":\"6\",\"name\":\"ABB_RT_X\"},{\"id\":\"7\",\"name\":\"ABB_Joint_1\"},{\"id\":\"8\",\"name\":\"ABB_Joint_2\"},{\"id\":\"9\",\"name\":\"ABB_Joint_3\"},{\"id\":\"10\",\"name\":\"ABB_Joint_4\"},{\"id\":\"11\",\"name\":\"ABB_Joint_5\"},{\"id\":\"12\",\"name\":\"ABB_Joint_6\"},{\"id\":\"13\",\"name\":\"ABB_RapidExecution\"},{\"id\":\"14\",\"name\":\"ABB_RapidExecutionCycler\"},{\"id\":\"15\",\"name\":\"ABB_RT_X\"},{\"id\":\"16\",\"name\":\"ABB_RT_Y\"},{\"id\":\"17\",\"name\":\"ABB_RT_Z\"},{\"id\":\"18\",\"name\":\"ABB_RT_Q1\"},{\"id\":\"19\",\"name\":\"ABB_RT_Q2\"},{\"id\":\"20\",\"name\":\"ABB_RT_Q3\"},{\"name\":\"ABB_RT_Q4\",\"id\":\"21\"}],\"del_params\":[\"property\",\"Address\"],\"edit_params\":[\"property\",\"Address\"],\"show_hide_params\":[\"property\",\"Address\"],\"data_type\":\"string\"}],\"event\":[]}";
            return "{\"device\":[{\"name\":\"IP\",\"label\":\"IP\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"IP\"],\"edit_params\":[\"device\",\"IP\"],\"show_hide_params\":[\"device\",\"IP\"],\"data_type\":\"string\"},{\"name\":\"Port\",\"label\":\"Port\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"Port\"],\"edit_params\":[\"device\",\"Port\"],\"show_hide_params\":[\"device\",\"Port\"],\"data_type\":\"string\"},{\"name\":\"User\",\"label\":\"User\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"User\"],\"edit_params\":[\"device\",\"User\"],\"show_hide_params\":[\"device\",\"User\"],\"default_value\":\"Default User\",\"data_type\":\"string\"},{\"name\":\"Password\",\"label\":\"Password\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"input\",\"is_required\":true,\"col\":24,\"no_format\":1,\"del_params\":[\"device\",\"Password\"],\"edit_params\":[\"device\",\"Password\"],\"show_hide_params\":[\"device\",\"Password\"],\"default_value\":\"robotics\",\"data_type\":\"string\"}],\"property\":[{\"name\":\"Address\",\"label\":\"Address\",\"label_btn\":\"show\",\"label_edit\":\"edit\",\"type\":\"select\",\"is_required\":true,\"col\":24,\"no_format\":1,\"select_options\":[{\"id\":\"1\",\"name\":\"ABB_ID\"},{\"id\":\"2\",\"name\":\"ABB_ErrStatus\"},{\"id\":\"3\",\"name\":\"ABB_Speedratio\"},{\"id\":\"4\",\"name\":\"ABB_OperationMode\"},{\"id\":\"5\",\"name\":\"ABB_CtrlState\"},{\"id\":\"7\",\"name\":\"ABB_Joint_1\"},{\"id\":\"8\",\"name\":\"ABB_Joint_2\"},{\"id\":\"9\",\"name\":\"ABB_Joint_3\"},{\"id\":\"10\",\"name\":\"ABB_Joint_4\"},{\"id\":\"11\",\"name\":\"ABB_Joint_5\"},{\"id\":\"12\",\"name\":\"ABB_Joint_6\"},{\"id\":\"13\",\"name\":\"ABB_RapidExecution\"},{\"id\":\"14\",\"name\":\"ABB_RapidExecutionCycler\"},{\"id\":\"15\",\"name\":\"ABB_RT_X\"},{\"id\":\"16\",\"name\":\"ABB_RT_Y\"},{\"id\":\"17\",\"name\":\"ABB_RT_Z\"},{\"id\":\"18\",\"name\":\"ABB_RT_Q1\"},{\"id\":\"19\",\"name\":\"ABB_RT_Q2\"},{\"id\":\"20\",\"name\":\"ABB_RT_Q3\"},{\"name\":\"ABB_RT_Q4\",\"id\":\"21\"}],\"select_options_ori\":[{\"id\":\"1\",\"name\":\"ABB_ID\"},{\"id\":\"2\",\"name\":\"ABB_ErrStatus\"},{\"id\":\"3\",\"name\":\"ABB_Speedratio\"},{\"id\":\"4\",\"name\":\"ABB_OperationMode\"},{\"id\":\"5\",\"name\":\"ABB_CtrlState\"},{\"id\":\"6\",\"name\":\"ABB_RT_X\"},{\"id\":\"7\",\"name\":\"ABB_Joint_1\"},{\"id\":\"8\",\"name\":\"ABB_Joint_2\"},{\"id\":\"9\",\"name\":\"ABB_Joint_3\"},{\"id\":\"10\",\"name\":\"ABB_Joint_4\"},{\"id\":\"11\",\"name\":\"ABB_Joint_5\"},{\"id\":\"12\",\"name\":\"ABB_Joint_6\"},{\"id\":\"13\",\"name\":\"ABB_RapidExecution\"},{\"id\":\"14\",\"name\":\"ABB_RapidExecutionCycler\"},{\"id\":\"15\",\"name\":\"ABB_RT_X\"},{\"id\":\"16\",\"name\":\"ABB_RT_Y\"},{\"id\":\"17\",\"name\":\"ABB_RT_Z\"},{\"id\":\"18\",\"name\":\"ABB_RT_Q1\"},{\"id\":\"19\",\"name\":\"ABB_RT_Q2\"},{\"id\":\"20\",\"name\":\"ABB_RT_Q3\"},{\"name\":\"ABB_RT_Q4\",\"id\":\"21\"}],\"del_params\":[\"property\",\"Address\"],\"edit_params\":[\"property\",\"Address\"],\"show_hide_params\":[\"property\",\"Address\"],\"data_type\":\"string\"}],\"event\":[]}";
        }

        public static string GetSchema()
        {
            return "{\"device_extension_config\":{\"ip\":{\"enum\":null,\"default\":null,\"column\":\"IP\",\"data_type\":\"string\"},\"password\":{\"enum\":null,\"default\":null,\"column\":\"Password\",\"data_type\":\"string\"},\"port\":{\"enum\":null,\"default\":null,\"column\":\"Port\",\"data_type\":\"string\"},\"user\":{\"enum\":null,\"default\":null,\"column\":\"User\",\"data_type\":\"string\"}},\"property_extension_config\":{\"address\":{\"enum\":null,\"default\":null,\"column\":\"Address\",\"data_type\":\"string\"}}}";
        }
    }
}
